using MicroMsg.Manager;
using MicroMsg.Resource.@string;
using System;
using System.Windows;
using System.Windows.Controls;
namespace MicroMsg.UI.Page
{
	public class R : ContentControl
	{
		private static R instance;
		private static MMTheme Theme = MMTheme.GetInstance();
		public static DependencyProperty skinProperty = DependencyProperty.Register("skin", typeof(object), typeof(R), new PropertyMetadata(null, null));
		public static MMTheme theme
		{
			get
			{
				return R.Theme;
			}
		}
		public static object skin
		{
			get
			{
				return null;
			}
			set
			{
				R.instance.SetValue(R.skinProperty, value);
			}
		}
		public stringsLoader StringsLoader_0
		{
			get;
			private set;
		}
		public R()
		{
			R.instance = this;
			this.StringsLoader_0 = new stringsLoader();
		}
		public static void AttachSysTheme()
		{
			MMThemeTypes systemThemeType = MMTheme.getSystemThemeType();
			if (MMTheme.getThemeType() != systemThemeType)
			{
				MMTheme.GetInstance().ChangeTheme(systemThemeType);
				MMTheme.SaveThemeType(systemThemeType);
			}
		}
		public static string GetCurrentLanguage()
		{
			return GConfigMgr.settings.strUserSetLanguage;
		}
		public static bool isEnglish()
		{
			return !R.isChineseCN() && !R.isChineseTW() && !R.isGermany();
		}
		public static bool isChineseCN()
		{
			return "zh-CN" == R.GetCurrentLanguage();
		}
		public static bool isChineseTW()
		{
			return "zh-TW" == R.GetCurrentLanguage();
		}
		public static bool isGermany()
		{
			return "de-DE" == R.GetCurrentLanguage();
		}
		public static string GetStringByKey(string string_0)
		{
			if (string_0 == null)
			{
				return "";
			}
			return strings.ResourceManager.GetString(string_0, strings.Culture);
		}
		public static void language_switch()
		{
			R.instance.StringsLoader_0.Switch();
		}
	}
}
